function findDuplicate(arr) {
    let result = [],
        length = arr.length;
    arr.forEach(value => {
        if (arr.indexOf(value) !== arr.lastIndexOf(value) && result.indexOf(value) === -1) {
            result.push(value);
        }
    });

    return result;
}

let arr = [1, 1, 1, 2, 3, "1", "1"]

console.log(findDuplicate(arr));